package club.kingyin.commons.clients;

import club.kingyin.commons.entity.core.Documents;
import club.kingyin.commons.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "ky-blog-pro-core")
//@FeignClient(value = "ky-blog-pro-core", url = "http://test2.kingyin.club:8088")
public interface CoreClient {

    @GetMapping(value = "/document/views/{id}", headers = {"KY-SERVICE=kingyin is yyds!"})
    Result getViewsById(@PathVariable("id") Integer id);

    @GetMapping(value = "/document/ids", headers = {"KY-SERVICE=kingyin is yyds!"})
    Result getDocByIds(@RequestBody Documents ids);
}
